using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Interpolation
{
    /// <summary>
    /// <para>Spline</para>
    /// <para>Interpolates a raster surface from points using a two-dimensional minimum curvature spline technique.</para>
    /// <para>使用二维最小曲率样条技术从点插值栅格表面。</para>
    /// </summary>    
    [DisplayName("Spline")]
    public class Spline : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Spline()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_point_features">
        /// <para>Input point features</para>
        /// <para>The input point features containing the z-values to be interpolated into a surface raster.</para>
        /// <para>包含要插值到表面栅格中的 z 值的输入点要素。</para>
        /// </param>
        /// <param name="_z_field">
        /// <para>Z value field</para>
        /// <para><xdoc>
        ///   <para>The field that holds a height or magnitude value for each point.</para>
        ///   <para>This can be a numeric field or the Shape field if the input point features contain z-values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个点的高度或大小值的字段。</para>
        ///   <para>这可以是数值字段，也可以是形状字段（如果输入点要素包含 z 值）。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// </param>
        public Spline(object _in_point_features, object _z_field, object _out_raster)
        {
            this._in_point_features = _in_point_features;
            this._z_field = _z_field;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Spline";

        public override string CallName => "3d.Spline";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_point_features, _z_field, _out_raster, _cell_size, _spline_type.GetGPValue(), _weight, _number_points];

        /// <summary>
        /// <para>Input point features</para>
        /// <para>The input point features containing the z-values to be interpolated into a surface raster.</para>
        /// <para>包含要插值到表面栅格中的 z 值的输入点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input point features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Z value field</para>
        /// <para><xdoc>
        ///   <para>The field that holds a height or magnitude value for each point.</para>
        ///   <para>This can be a numeric field or the Shape field if the input point features contain z-values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>保存每个点的高度或大小值的字段。</para>
        ///   <para>这可以是数值字段，也可以是形状字段（如果输入点要素包含 z 值）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _z_field { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Spline type</para>
        /// <para><xdoc>
        ///   <para>The type of spline to be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Regularized—Yields a smooth surface and smooth first derivatives.</bullet_item><para/>
        ///     <bullet_item>Tension—Tunes the stiffness of the interpolant according to the character of the modeled phenomenon.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的样条曲线类型。</para>
        ///   <bulletList>
        ///     <bullet_item>正则化 （Regularized） - 生成光滑曲面和平滑一阶导数。</bullet_item><para/>
        ///     <bullet_item>张力 （Tension） - 根据建模现象的特征调整插值的刚度。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spline type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _spline_type_value _spline_type { get; set; } = _spline_type_value._REGULARIZED;

        public enum _spline_type_value
        {
            /// <summary>
            /// <para>Regularized</para>
            /// <para>Regularized—Yields a smooth surface and smooth first derivatives.</para>
            /// <para>正则化 （Regularized） - 生成光滑曲面和平滑一阶导数。</para>
            /// </summary>
            [Description("Regularized")]
            [GPEnumValue("REGULARIZED")]
            _REGULARIZED,

            /// <summary>
            /// <para>Tension</para>
            /// <para>Tension—Tunes the stiffness of the interpolant according to the character of the modeled phenomenon.</para>
            /// <para>张力 （Tension） - 根据建模现象的特征调整插值的刚度。</para>
            /// </summary>
            [Description("Tension")]
            [GPEnumValue("TENSION")]
            _TENSION,

        }

        /// <summary>
        /// <para>Weight</para>
        /// <para><xdoc>
        ///   <para>Parameter influencing the character of the surface interpolation.</para>
        ///   <para>When the Regularized option is used, it defines the weight of the third derivatives of the surface in the curvature minimization expression. If the Tension option is used, it defines the weight of tension.</para>
        ///   <para>The default weight is 0.1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>影响曲面插值特性的参数。</para>
        ///   <para>当使用正则化选项时，它在曲率最小化表达式中定义曲面的三次导数的权重。如果使用“张力”（Tension） 选项，则定义张力的权重。</para>
        ///   <para>默认权重为 0.1。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _weight { get; set; } = 0.1;


        /// <summary>
        /// <para>Number of points</para>
        /// <para><xdoc>
        ///   <para>The number of points per region used for local approximation.</para>
        ///   <para>The default is 12.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于局部近似的每个区域的点数。</para>
        ///   <para>默认值为 12。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _number_points { get; set; } = 12;


        public Spline SetEnv(int? autoCommit = null, object cellSize = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}